#!/bin/python3
#-*- coding: utf-8 -*-
# exp_23.py
# @author 刘秋
# @email lq@aqiu.info
# @description
# @created 2020-04-16T11:05:22.296Z+08:00
# @last-modified 2020-04-16T11:23:17.772Z+08:00
#

#打印出如下图案（菱形）

# n = [1]
# s = 4
# for i in range(s):
#     print(" "*(s-i),"*"*n[-1])
#     n.append(n[-1]+2)
# for i in n[-1::-1]:
#     print(" "*(s-len(n)+1),"*"*i)
#     n.pop()
# # print(n)


def pic(lines):    
    middle, lines = int(lines / 2), int(lines / 2) * 2 + 1    
    for i in range(1, lines + 1):        
        empty = abs(i - middle - 1)        
        print(' ' * empty, '*' * (2 * (middle - empty) + 1))
        
pic(7)